<?

if($_REQUEST["action"]=="menusOrdres"){

	$menus=explode(":",$_REQUEST["ordres"]);
	$i=1;
	$sql_array=array();
	foreach($menus as $menu){
		if($menu!=""){
			$sql_array[]="update ".CFG_MYSQL_PREFIX."menu set ordre=".$i." where id=".substr($menu,5);
			$i++;
		}
	}
	$sql->query($sql_array,1);
}

if($_REQUEST["action"]=="menusSupprimer"){
	
	$sql->query("delete from ".CFG_MYSQL_PREFIX."menu where id=".substr($_REQUEST["id"],5));
	
}
